<meta http-equiv="content-type" charset="UTF-8">
<link rel="stylesheet" href="<?php echo TEMPLATES_PATH; ?>/promotions/pt-style.css"/>
<style>
    .tab li {width: <?php echo floor(100/count($output['promotions_group']))?>%;}
</style>
<header class="layout head padding-small">
    <a href="javascript:pageBack();" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white"><?php echo $output['html_title']?></h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>

<ul class="tab">
    <?php if(is_array($output['promotions_group']) && !empty($output['promotions_group'])){?>
                    <?php foreach ($output['promotions_group'] as $k=>$v){?>
            <li><a class="item <?php if($_GET['promotions_group_id'] ==$k){echo 'current';}?>" href="index.php?act=Promotions&op=list&promotions_type_id=<?php echo $output['promotions_type_id'];?>&promotions_group_id=<?php echo $k;?>"><?php echo $v;?></a></li>
                    <?php } ?>
    <?php }?>
</ul>
<?php if(!empty($output['goods_all']) && is_array($output['goods_all'])){
    foreach($output['goods_all'] as $goods){?>
        <div class="widget goods com-wgt" >
            <div class="com-wp">
                <div class="clearfix com-cnt">
                    <div class="com-pic"><a href="<?php echo ncUrl(array('act'=>'goods','goods_id'=>$goods['goods_id']), 'goods');?>"><img
                                alt="" style="width:7rem;height:7rem" class=""
                                src="<?php echo thumb($goods,'small');?>"></a>
                    </div>
                    <div class="com-info clearfix">
                        <div class="com-title"><a href="<?php echo ncUrl(array('act'=>'goods','goods_id'=>$goods['goods_id']), 'goods');?>"><?php echo $goods['goods_name'] ?></a></div>
                        <div class="origin-price">
                            <?php if($_GET['promotions_group_id']==PROMOTIONS_BEST){
                                echo '畅销价';
                            }else{
                                echo '美财价';
                            }
                            ?><i class="yen">¥</i><i class="money"><?php if ($_SESSION['is_login'] == '1') {
                                    echo $goods['goods_store_price'];
                                } else {
                                    echo '<a href="index.php?act=login">请登录</a>';
                                } ?></i></div>
                        <?php if($_GET['promotions_group_id']==PROMOTIONS_SPECIAL){?>
                            <span class="origin-price">特价<i class="yen">¥</i><i class="money"><?php if ($_SESSION['is_login'] == '1') {
                                    if($goods['xianshi_flag']==1&&$goods['xianshi_discount']!='0.00'){
                                        echo ncPriceFormat($goods['goods_store_price']*($goods['xianshi_discount']/10));
                                    }else{
                                        echo $goods['goods_store_price'];
                                    }
                                } else {
                                    echo '<a href="index.php?act=login">请登录</a>';
                                } ?></i></span><?php }?>
                        <?php if($_GET['promotions_type_id']==PROMOTIONS_MF&&$_GET['promotions_group_id']==PROMOTIONS_GIVE){?>
                            <span class="origin-price">买一送一</span><?php }?>
                        <a href="<?php echo ncUrl(array('act'=>'goods','goods_id'=>$goods['goods_id']), 'goods');?>" class="sale-stat sale-count">立即抢购</a>
                    </div>
                </div>
            </div>
        </div>
    <?php    }
}?>
<?php require_once 'page.php';?>